<template>
  <div style="background: #F5F6F8;">
    <ul class="nav-bar clearfix" style="margin:0;">
      <IconFormComponents :style="iconFormstyle"
          v-for="iconForm in iconForms"
          :type="iconForm.type"
          :formName="iconForm.formName"
          :imgPath="iconForm.imgPath"
          :routerPath="iconForm.routerPath"
          :url="iconForm.url"
      />
    </ul>
  </div>
</template>
<script>
  import Vue from 'vue'
  import { ACCESS_TOKEN,USER_INFO } from '@/store/mutation-types'
  import IconFormComponents from '@/views/dashboard/IconFormComponents'

  const ticket = Vue.ls.get(ACCESS_TOKEN)
  const userId = Vue.ls.get(USER_INFO).Ur_ID
  const urlArray = [
    'http://23.36.2.226/login.xip?LoginMethod=portalletlogin&Userid=1&ReturnUrl=%2fLawList.xip#',
    // 'http://10.0.149.24/jgptyzt/default.aspx?ticket=' + ticket + 'ea16fa97-1a09-4df9-afa7-862d5f3a7f65&userip=23.36.75.224&xttitle=jg.Address▲ie#',
    'http://23.36.2.131:888/login.xip?LoginMethod=portalletlogin&Userid=' + userId,
    'http://23.36.2.48:6888/login.xip?LoginMethod=portalletlogin&Userid=1364&ReturnUrl=%2fModules%2fKnowledgebase%2fhomepage.aspx%3fpid%3d33#',
    'http://23.36.120.41:8001/NewPage/Home/V2/Index.html#'
  ]

  // 法律法规：http://23.36.2.226/login.xip?LoginMethod=portalletlogin&Userid=1&ReturnUrl=%2fLawList.xip#
  // 一张图：http://10.0.149.24/jgptyzt/default.aspx?ticket=ea16fa97-1a09-4df9-afa7-862d5f3a7f65&userip=23.36.75.224&xttitle=jg.Address▲ie#
  // 知识库：http://23.36.2.48:6888/login.xip?LoginMethod=portalletlogin&Userid=1364&ReturnUrl=%2fModules%2fKnowledgebase%2fhomepage.aspx%3fpid%3d33#
  // 统计分析：http://23.36.2.48:9888/login.xip?LoginMethod=portalletlogin&Userid=1364&ReturnUrl=%2fStatisQueryListView.xip#
  // 网审平台：http://23.99.127.111:8083/login;JSESSIONID=164887be-a1e2-442d-ad51-72963611bee0

  export default {
    components: { IconFormComponents },
    data(){
      return{
        iconForms:[],
        iconFormstyle:{}
      }
    },
    mounted() {
      this.initIconForms();
    },
    methods: {
      initIconForms(){
        this.iconForms = [
        //   {
        //   type:1,formName:"全面从严治党",imgPath:require("../../assets/nav/22.png"),routerPath:'home-party'
        // },
          {
          type:2,formName:"法律法规",imgPath:require("../../assets/nav/2.png"),routerPath:'/LawList',url:urlArray[0]
        },{
          type:2,formName:"国土空间规划一张图",imgPath:require("../../assets/nav/3.png"),routerPath:'/land/planning',url:urlArray[1]
        },{
          type:2,formName:"知识库",imgPath:require("../../assets/nav/4.png"),routerPath:'/Knowledge',url:urlArray[2]
        },
        //   {
        //   type:2,formName:"大数据监测",imgPath:require("../../assets/nav/5.png"),routerPath:'/StatisQueryList',url:urlArray[3]
        // }
        ],
        this.iconFormstyle = {
          width : 100/this.iconForms.length+"%"
        }
      },
    }
  }
</script>
<style scoped>
  .nav-bar li {
    /*width: 20%;*/
    padding-bottom: 0;
  }
</style>
